﻿<style>
    body {
        font-family: Arial, sans-serif;
    }

    .place {
        margin: 20px;
    }

    .tools {
        margin-bottom: 20px;
    }

    .seachform {
        list-style: none;
        margin: 0;
        padding: 0;
    }

        .seachform li {
            display: inline-block;
            margin-right: 10px;
        }

    .scinput input[type="text"] {
        padding: 5px 10px;
        border-radius: 3px;
        border: 1px solid #ccc;
    }

    input[type="submit"] {
        padding: 5px 15px;
        background-color: #4CAF50;
        color: white;
        border-radius: 3px;
        border: none;
        cursor: pointer;
    }

        input[type="submit"]:hover {
            background-color: #3e8e41;
        }
</style>

<div class="place">
</div>
<form action="/Role/AddType" method="post">
    <div class="tools ">
        <ul class="seachform">
            <li>@Html.Label("商品类名")</li>
            <li class="scinput"><input name="Name" type="text"></li>
        </ul>
    </div>
    <div>
        <div class="tools ">
            <ul class="seachform">
                <li>@Html.Label("商品类状态：")</li>
                        <li><input type="radio" name="state" checked="checked" value="true" /><span>激活</span></li>
                        <li><input type="radio" name="state" value="false" /><span>禁用</span></li>

                  
                <br />

            </ul>
        </div>
    </div>
    <div class="tools ">
        <ul class="seachform">
        </ul>
    </div>
    <div>
        <input type="submit" value="确定"  class="scbtn" onclick="funadd();return getValue()" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    </div>
</form>
<script>
    function funadd()
    {
        alert('添加成功');
    }
    function getValue() {
        console.log($('#UserName').val());
        if ($('#UserName').val() == "") {
            alert("请输入账号！");
            return false;
        }
        if ($('#Password').val() == "") {
            alert("请输入密码！");
            return false;
        }
        var s = "";
        $('input[name="rIds"]:checked').each(function () {

            s = s + $(this).val() + ",";
        });
        $('#roleIDs').val(s);
        $('#status').val($('input[name="Status"]:checked').val());
        return confirm('确定操作？');
    }
</script>